Optimal. Leaf size=198 \[ -\frac {A d^2}{2 b^3 x^2}-\frac {d (b B d-3 A c d+2 A b e)}{b^4 x}-\frac {(b B-A c) (c d-b e)^2}{2 b^3 c (b+c x)^2}-\frac {(c d-b e) (2 b B d-3 A c d+A b e)}{b^4 (b+c x)}+\frac {\left (6 A c^2 d^2+b^2 e (2 B d+A e)-3 b c d (B d+2 A e)\right ) \log (x)}{b^5}-\frac {\left (6 A c^2 d^2+b^2 e (2 B d+A e)-3 b c d (B d+2 A e)\right ) \log (b+c x)}{b^5} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 198, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.042, Rules used = {785}
\begin {gather*} -\frac {d (2 A b e-3 A c d+b B d)}{b^4 x}-\frac {(c d-b e) (A b e-3 A c d+2 b B d)}{b^4 (b+c x)}-\frac {(b B-A c) (c d-b e)^2}{2 b^3 c (b+c x)^2}-\frac {A d^2}{2 b^3 x^2}+\frac {\log (x) \left (b^2 e (A e+2 B d)-3 b c d (2 A e+B d)+6 A c^2 d^2\right )}{b^5}-\frac {\log (b+c x) \left (b^2 e (A e+2 B d)-3 b c d (2 A e+B d)+6 A c^2 d^2\right )}{b^5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 785
Rubi steps
\begin {align*} \int \frac {(A+B x) (d+e x)^2}{\left (b x+c x^2\right )^3} \, dx &=\int \left (\frac {A d^2}{b^3 x^3}+\frac {d (b B d-3 A c d+2 A b e)}{b^4 x^2}+\frac {6 A c^2 d^2+b^2 e (2 B d+A e)-3 b c d (B d+2 A e)}{b^5 x}+\frac {(b B-A c) (-c d+b e)^2}{b^3 (b+c x)^3}-\frac {c (-c d+b e) (2 b B d-3 A c d+A b e)}{b^4 (b+c x)^2}+\frac {c \left (-6 A c^2 d^2-b^2 e (2 B d+A e)+3 b c d (B d+2 A e)\right )}{b^5 (b+c x)}\right ) \, dx\\ &=-\frac {A d^2}{2 b^3 x^2}-\frac {d (b B d-3 A c d+2 A b e)}{b^4 x}-\frac {(b B-A c) (c d-b e)^2}{2 b^3 c (b+c x)^2}-\frac {(c d-b e) (2 b B d-3 A c d+A b e)}{b^4 (b+c x)}+\frac {\left (6 A c^2 d^2+b^2 e (2 B d+A e)-3 b c d (B d+2 A e)\right ) \log (x)}{b^5}-\frac {\left (6 A c^2 d^2+b^2 e (2 B d+A e)-3 b c d (B d+2 A e)\right ) \log (b+c x)}{b^5}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.20, size = 190, normalized size = 0.96 \begin {gather*} -\frac {\frac {A b^2 d^2}{x^2}+\frac {2 b d (b B d-3 A c d+2 A b e)}{x}+\frac {b^2 (b B-A c) (c d-b e)^2}{c (b+c x)^2}-\frac {2 b (-c d+b e) (2 b B d-3 A c d+A b e)}{b+c x}-2 \left (6 A c^2 d^2+b^2 e (2 B d+A e)-3 b c d (B d+2 A e)\right ) \log (x)+2 \left (6 A c^2 d^2+b^2 e (2 B d+A e)-3 b c d (B d+2 A e)\right ) \log (b+c x)}{2 b^5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.62, size = 259, normalized size = 1.31
method | result | size |
default | \(-\frac {-A \,b^{2} c \,e^{2}+2 A b \,c^{2} d e -A \,c^{3} d^{2}+b^{3} B \,e^{2}-2 B \,b^{2} c d e +B b \,c^{2} d^{2}}{2 b^{3} c \left (c x +b \right )^{2}}-\frac {\left (A \,b^{2} e^{2}-6 A b c d e +6 A \,c^{2} d^{2}+2 B \,b^{2} d e -3 B b c \,d^{2}\right ) \ln \left (c x +b \right )}{b^{5}}+\frac {A \,b^{2} e^{2}-4 A b c d e +3 A \,c^{2} d^{2}+2 B \,b^{2} d e -2 B b c \,d^{2}}{b^{4} \left (c x +b \right )}+\frac {\left (A \,b^{2} e^{2}-6 A b c d e +6 A \,c^{2} d^{2}+2 B \,b^{2} d e -3 B b c \,d^{2}\right ) \ln \left (x \right )}{b^{5}}-\frac {A \,d^{2}}{2 b^{3} x^{2}}-\frac {d \left (2 A b e -3 A c d +B b d \right )}{b^{4} x}\) | \(259\) |
norman | \(\frac {\frac {\left (A \,b^{2} c^{2} e^{2}-6 A b \,c^{3} d e +6 A \,c^{4} d^{2}+2 B \,b^{2} c^{2} d e -3 B b \,c^{3} d^{2}\right ) x^{3}}{c \,b^{4}}-\frac {A \,d^{2}}{2 b}-\frac {d \left (2 A b e -2 A c d +B b d \right ) x}{b^{2}}+\frac {\left (3 A \,b^{2} c^{2} e^{2}-18 A b \,c^{3} d e +18 A \,c^{4} d^{2}-B \,b^{3} c \,e^{2}+6 B \,b^{2} c^{2} d e -9 B b \,c^{3} d^{2}\right ) x^{2}}{2 b^{3} c^{2}}}{x^{2} \left (c x +b \right )^{2}}+\frac {\left (A \,b^{2} e^{2}-6 A b c d e +6 A \,c^{2} d^{2}+2 B \,b^{2} d e -3 B b c \,d^{2}\right ) \ln \left (x \right )}{b^{5}}-\frac {\left (A \,b^{2} e^{2}-6 A b c d e +6 A \,c^{2} d^{2}+2 B \,b^{2} d e -3 B b c \,d^{2}\right ) \ln \left (c x +b \right )}{b^{5}}\) | \(278\) |
risch | \(\frac {\frac {c \left (A \,b^{2} e^{2}-6 A b c d e +6 A \,c^{2} d^{2}+2 B \,b^{2} d e -3 B b c \,d^{2}\right ) x^{3}}{b^{4}}+\frac {\left (3 A \,b^{2} c \,e^{2}-18 A b \,c^{2} d e +18 A \,c^{3} d^{2}-b^{3} B \,e^{2}+6 B \,b^{2} c d e -9 B b \,c^{2} d^{2}\right ) x^{2}}{2 b^{3} c}-\frac {d \left (2 A b e -2 A c d +B b d \right ) x}{b^{2}}-\frac {A \,d^{2}}{2 b}}{x^{2} \left (c x +b \right )^{2}}-\frac {\ln \left (c x +b \right ) A \,e^{2}}{b^{3}}+\frac {6 \ln \left (c x +b \right ) A c d e}{b^{4}}-\frac {6 \ln \left (c x +b \right ) A \,c^{2} d^{2}}{b^{5}}-\frac {2 \ln \left (c x +b \right ) B d e}{b^{3}}+\frac {3 \ln \left (c x +b \right ) B c \,d^{2}}{b^{4}}+\frac {\ln \left (-x \right ) A \,e^{2}}{b^{3}}-\frac {6 \ln \left (-x \right ) A c d e}{b^{4}}+\frac {6 \ln \left (-x \right ) A \,c^{2} d^{2}}{b^{5}}+\frac {2 \ln \left (-x \right ) B d e}{b^{3}}-\frac {3 \ln \left (-x \right ) B c \,d^{2}}{b^{4}}\) | \(307\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 302, normalized size = 1.53 \begin {gather*} -\frac {A b^{3} c d^{2} - 2 \, {\left (A b^{2} c^{2} e^{2} - 3 \, {\left (B b c^{3} - 2 \, A c^{4}\right )} d^{2} + 2 \, {\left (B b^{2} c^{2} e - 3 \, A b c^{3} e\right )} d\right )} x^{3} + {\left (B b^{4} e^{2} - 3 \, A b^{3} c e^{2} + 9 \, {\left (B b^{2} c^{2} - 2 \, A b c^{3}\right )} d^{2} - 6 \, {\left (B b^{3} c e - 3 \, A b^{2} c^{2} e\right )} d\right )} x^{2} + 2 \, {\left (2 \, A b^{3} c d e + {\left (B b^{3} c - 2 \, A b^{2} c^{2}\right )} d^{2}\right )} x}{2 \, {\left (b^{4} c^{3} x^{4} + 2 \, b^{5} c^{2} x^{3} + b^{6} c x^{2}\right )}} - \frac {{\left (A b^{2} e^{2} - 3 \, {\left (B b c - 2 \, A c^{2}\right )} d^{2} + 2 \, {\left (B b^{2} e - 3 \, A b c e\right )} d\right )} \log \left (c x + b\right )}{b^{5}} + \frac {{\left (A b^{2} e^{2} - 3 \, {\left (B b c - 2 \, A c^{2}\right )} d^{2} + 2 \, {\left (B b^{2} e - 3 \, A b c e\right )} d\right )} \log \left (x\right )}{b^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 583 vs.
\(2 (204) = 408\).
time = 3.56, size = 583, normalized size = 2.94 \begin {gather*} -\frac {A b^{4} c d^{2} + 6 \, {\left (B b^{2} c^{3} - 2 \, A b c^{4}\right )} d^{2} x^{3} + 9 \, {\left (B b^{3} c^{2} - 2 \, A b^{2} c^{3}\right )} d^{2} x^{2} + 2 \, {\left (B b^{4} c - 2 \, A b^{3} c^{2}\right )} d^{2} x - {\left (2 \, A b^{3} c^{2} x^{3} - {\left (B b^{5} - 3 \, A b^{4} c\right )} x^{2}\right )} e^{2} + 2 \, {\left (2 \, A b^{4} c d x - 2 \, {\left (B b^{3} c^{2} - 3 \, A b^{2} c^{3}\right )} d x^{3} - 3 \, {\left (B b^{4} c - 3 \, A b^{3} c^{2}\right )} d x^{2}\right )} e - 2 \, {\left (3 \, {\left (B b c^{4} - 2 \, A c^{5}\right )} d^{2} x^{4} + 6 \, {\left (B b^{2} c^{3} - 2 \, A b c^{4}\right )} d^{2} x^{3} + 3 \, {\left (B b^{3} c^{2} - 2 \, A b^{2} c^{3}\right )} d^{2} x^{2} - {\left (A b^{2} c^{3} x^{4} + 2 \, A b^{3} c^{2} x^{3} + A b^{4} c x^{2}\right )} e^{2} - 2 \, {\left ({\left (B b^{2} c^{3} - 3 \, A b c^{4}\right )} d x^{4} + 2 \, {\left (B b^{3} c^{2} - 3 \, A b^{2} c^{3}\right )} d x^{3} + {\left (B b^{4} c - 3 \, A b^{3} c^{2}\right )} d x^{2}\right )} e\right )} \log \left (c x + b\right ) + 2 \, {\left (3 \, {\left (B b c^{4} - 2 \, A c^{5}\right )} d^{2} x^{4} + 6 \, {\left (B b^{2} c^{3} - 2 \, A b c^{4}\right )} d^{2} x^{3} + 3 \, {\left (B b^{3} c^{2} - 2 \, A b^{2} c^{3}\right )} d^{2} x^{2} - {\left (A b^{2} c^{3} x^{4} + 2 \, A b^{3} c^{2} x^{3} + A b^{4} c x^{2}\right )} e^{2} - 2 \, {\left ({\left (B b^{2} c^{3} - 3 \, A b c^{4}\right )} d x^{4} + 2 \, {\left (B b^{3} c^{2} - 3 \, A b^{2} c^{3}\right )} d x^{3} + {\left (B b^{4} c - 3 \, A b^{3} c^{2}\right )} d x^{2}\right )} e\right )} \log \left (x\right )}{2 \, {\left (b^{5} c^{3} x^{4} + 2 \, b^{6} c^{2} x^{3} + b^{7} c x^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 660 vs.
\(2 (197) = 394\).
time = 5.45, size = 660, normalized size = 3.33 \begin {gather*} \frac {- A b^{3} c d^{2} + x^{3} \cdot \left (2 A b^{2} c^{2} e^{2} - 12 A b c^{3} d e + 12 A c^{4} d^{2} + 4 B b^{2} c^{2} d e - 6 B b c^{3} d^{2}\right ) + x^{2} \cdot \left (3 A b^{3} c e^{2} - 18 A b^{2} c^{2} d e + 18 A b c^{3} d^{2} - B b^{4} e^{2} + 6 B b^{3} c d e - 9 B b^{2} c^{2} d^{2}\right ) + x \left (- 4 A b^{3} c d e + 4 A b^{2} c^{2} d^{2} - 2 B b^{3} c d^{2}\right )}{2 b^{6} c x^{2} + 4 b^{5} c^{2} x^{3} + 2 b^{4} c^{3} x^{4}} + \frac {\left (A b^{2} e^{2} - 6 A b c d e + 6 A c^{2} d^{2} + 2 B b^{2} d e - 3 B b c d^{2}\right ) \log {\left (x + \frac {A b^{3} e^{2} - 6 A b^{2} c d e + 6 A b c^{2} d^{2} + 2 B b^{3} d e - 3 B b^{2} c d^{2} - b \left (A b^{2} e^{2} - 6 A b c d e + 6 A c^{2} d^{2} + 2 B b^{2} d e - 3 B b c d^{2}\right )}{2 A b^{2} c e^{2} - 12 A b c^{2} d e + 12 A c^{3} d^{2} + 4 B b^{2} c d e - 6 B b c^{2} d^{2}} \right )}}{b^{5}} - \frac {\left (A b^{2} e^{2} - 6 A b c d e + 6 A c^{2} d^{2} + 2 B b^{2} d e - 3 B b c d^{2}\right ) \log {\left (x + \frac {A b^{3} e^{2} - 6 A b^{2} c d e + 6 A b c^{2} d^{2} + 2 B b^{3} d e - 3 B b^{2} c d^{2} + b \left (A b^{2} e^{2} - 6 A b c d e + 6 A c^{2} d^{2} + 2 B b^{2} d e - 3 B b c d^{2}\right )}{2 A b^{2} c e^{2} - 12 A b c^{2} d e + 12 A c^{3} d^{2} + 4 B b^{2} c d e - 6 B b c^{2} d^{2}} \right )}}{b^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.84, size = 324, normalized size = 1.64 \begin {gather*} -\frac {{\left (3 \, B b c d^{2} - 6 \, A c^{2} d^{2} - 2 \, B b^{2} d e + 6 \, A b c d e - A b^{2} e^{2}\right )} \log \left ({\left | x \right |}\right )}{b^{5}} + \frac {{\left (3 \, B b c^{2} d^{2} - 6 \, A c^{3} d^{2} - 2 \, B b^{2} c d e + 6 \, A b c^{2} d e - A b^{2} c e^{2}\right )} \log \left ({\left | c x + b \right |}\right )}{b^{5} c} - \frac {6 \, B b c^{3} d^{2} x^{3} - 12 \, A c^{4} d^{2} x^{3} - 4 \, B b^{2} c^{2} d x^{3} e + 12 \, A b c^{3} d x^{3} e + 9 \, B b^{2} c^{2} d^{2} x^{2} - 18 \, A b c^{3} d^{2} x^{2} - 2 \, A b^{2} c^{2} x^{3} e^{2} - 6 \, B b^{3} c d x^{2} e + 18 \, A b^{2} c^{2} d x^{2} e + 2 \, B b^{3} c d^{2} x - 4 \, A b^{2} c^{2} d^{2} x + B b^{4} x^{2} e^{2} - 3 \, A b^{3} c x^{2} e^{2} + 4 \, A b^{3} c d x e + A b^{3} c d^{2}}{2 \, {\left (c x^{2} + b x\right )}^{2} b^{4} c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.26, size = 319, normalized size = 1.61 \begin {gather*} -\frac {\frac {A\,d^2}{2\,b}-\frac {c\,x^3\,\left (2\,B\,b^2\,d\,e+A\,b^2\,e^2-3\,B\,b\,c\,d^2-6\,A\,b\,c\,d\,e+6\,A\,c^2\,d^2\right )}{b^4}+\frac {d\,x\,\left (2\,A\,b\,e-2\,A\,c\,d+B\,b\,d\right )}{b^2}-\frac {x^2\,\left (-B\,b^3\,e^2+6\,B\,b^2\,c\,d\,e+3\,A\,b^2\,c\,e^2-9\,B\,b\,c^2\,d^2-18\,A\,b\,c^2\,d\,e+18\,A\,c^3\,d^2\right )}{2\,b^3\,c}}{b^2\,x^2+2\,b\,c\,x^3+c^2\,x^4}-\frac {2\,\mathrm {atanh}\left (\frac {\left (b+2\,c\,x\right )\,\left (b^2\,\left (A\,e^2+2\,B\,d\,e\right )-b\,\left (3\,B\,c\,d^2+6\,A\,c\,e\,d\right )+6\,A\,c^2\,d^2\right )}{b\,\left (2\,B\,b^2\,d\,e+A\,b^2\,e^2-3\,B\,b\,c\,d^2-6\,A\,b\,c\,d\,e+6\,A\,c^2\,d^2\right )}\right )\,\left (b^2\,\left (A\,e^2+2\,B\,d\,e\right )-b\,\left (3\,B\,c\,d^2+6\,A\,c\,e\,d\right )+6\,A\,c^2\,d^2\right )}{b^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________